<!--停机位配置-->
<div class = "gpcf">
    <div class="consume-panel">

    <el-button  @click="addGp" type="primary">添加</el-button>
        <el-form    label-width="100%">
            <el-form-item label="">
            </el-form-item>
        </el-form>
    <!--表格数据-->
    <template>
        <kf-table
                ref="baseTable"
                :data="tableData"
                one-screen
                border
                :close-on-click-modal="false"
                :title="tl"
                width="diawidth"
                top="50px"
                layout="total, sizes, prev, pager, next, jumper"
        >
            <el-table-column prop="gpName"  label="机位名称" >
            </el-table-column>
            <el-table-column prop="gpNum" label="机位编号">
            </el-table-column>
            <!--<el-table-column prop="apron" label="机位类型">-->
            <!--</el-table-column>-->
            <el-table-column prop="apron" label="所在机坪">
           </el-table-column>

           <el-table-column prop="gpState" label="机位状态">
            </el-table-column>
            <el-table-column label="位置">
                <template scope="scope">
                                <span>
                                    ({{(scope.row.px)}},{{(scope.row.py)}})
                                </span>
                </template>
            </el-table-column>
            <el-table-column label="操作" fixed="right" width="180px">
                <template scope="scope">
                    <el-button  @click="editGp(scope)" type="text">修改</el-button>
                    <el-button  @click="delectGp(scope)" type="text">删除</el-button>
                </template>
            </el-table-column>



            <!--模态框-添加停机位-->
            <template slot="editForm">
                <el-form :inline="true" :model="addGpData" ref="addGpData" class="regular-form demo-form-inline">
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="机位名称" label-width="100px" prop="gpName">
                                <el-input v-model="addGpData.gpName" maxlength=150></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="机位编号" label-width="100px" prop="gpNum">
                                <el-input v-model="addGpData.gpNum"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="所在机坪"label-width="100px" prop="gpType">
                                <el-input v-model="addGpData.apron"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="机位状态" label-width="100px" prop="gpState">
                                <el-select v-model="addGpData.gpState" placeholder="请选择" style="width: 80px" >
                                    <el-option
                                            v-for="item in gpStateTy"
                                            :key="item.value"
                                            :label="item.label"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="位置-X"label-width="100px" prop="px">
                                <el-input v-model="addGpData.px"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="位置-Y"label-width="100px" prop="px">
                                <el-input v-model="addGpData.py"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </template>
            <template slot="formBtn">
                <el-button  @click="clear()">取 消</el-button>
                <el-button type="primary" @click="saveClick()">确定保存</el-button>
            </template>
        </kf-table>
    </template>
    </div>
</div>